TARGET = $(LIB)libconfig.a
DEBUG_TARGET = $(LIB)libdebug_config.a
UT_TARGET = $(LIB)libut_config.a

#All
.PHONY: all
all: $(TARGET)
$(TARGET): $(TARGET)(ProfileParser.o ProfileFileParser.o Profile.o)
ProfileParser.o: ProfileParser.cpp ProfileParser.h
	$(CXXFLAGS) -c -I$(ERROR_SRC) -I$(UTILITY_SRC) -I $(INCLUDE) ProfileParser.cpp 
ProfileFileParser.o: ProfileFileParser.cpp ProfileFileParser.h
	$(CXXFLAGS) -c -I$(ERROR_SRC) -I$(UTILITY_SRC) -I $(INCLUDE) ProfileFileParser.cpp 
Profile.o: Profile.cpp Profile.h
	$(CXXFLAGS) -c Profile.cpp 

#Debug
.PHONY: debug
debug: $(DEBUG_TARGET)
$(DEBUG_TARGET): $(DEBUG_TARGET)(debug_ProfileParser.o debug_ProfileFileParser.o debug_Profile.o)
debug_ProfileParser.o: ProfileParser.cpp ProfileParser.h
	$(CXXFLAGS) -c $(DEBUG_FLAGS) -o debug_ProfileParser.o \
			-I$(ERROR_SRC) -I$(UTILITY_SRC) -I $(INCLUDE) ProfileParser.cpp 
debug_ProfileFileParser.o: ProfileFileParser.cpp ProfileFileParser.h
	$(CXXFLAGS) -c $(DEBUG_FLAGS) -o debug_ProfileFileParser.o \
			-I$(ERROR_SRC) -I$(UTILITY_SRC) -I $(INCLUDE) ProfileFileParser.cpp 
debug_Profile.o: Profile.cpp Profile.h
	$(CXXFLAGS) -c $(DEBUG_FLAGS) -o debug_Profile.o Profile.cpp 

#Clean
.PHONY: clean
clean:
	-rm *.o $(TARGET) $(DEBUG_TARGET) $(UT_TARGET)
